home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-12 | 1.5 KB | 98 lines | [TEXT/CWIE] |
- #include "CPlayerWindow.h"
-
- CPlayerWindow::CPlayerWindow()
- {
- }
-
- CPlayerWindow::CPlayerWindow(
- LStream *inStream) : LWindow(inStream)
- {
- }
-
- CPlayerWindow::~CPlayerWindow()
- {
- }
-
- CPlayerWindow*
- CPlayerWindow::CreatePlayerWindowStream(
- LStream *inStream)
- {
- return (new CPlayerWindow(inStream));
- }
-
-
- void CPlayerWindow::FinishCreateSelf(void)
- {
- mUp = mDown = mLeft = mRight = false;
-
- mUpRect.top = 20;
- mUpRect.bottom = 36;
- mUpRect.left = 40;
- mUpRect.right = 56;
-
- mDownRect.top = 40;
- mDownRect.bottom = 56;
- mDownRect.left = 40;
- mDownRect.right = 56;
-
- mLeftRect.top = 40;
- mLeftRect.bottom = 56;
- mLeftRect.left = 60;
- mLeftRect.right = 76;
-
- mRightRect.top = 40;
- mRightRect.bottom = 56;
- mRightRect.left = 20;
- mRightRect.right = 36;
-
- mPulseRect.top = 5;
- mPulseRect.bottom = 10;
- mPulseRect.left = 5;
- mPulseRect.right = 10;
-
- mTimeRect.top = 60;
- mTimeRect.bottom = 80;
- mTimeRect.left = 50;
- mTimeRect.right = 150;
-
- TextFont(1);
- TextSize(0);
-
- }
-
-
- void CPlayerWindow::DrawSelf()
- {
- Str255 str;
-
- if (mUp)
- PaintRect(&mUpRect);
- else
- EraseRect(&mUpRect);
-
- if (mDown)
- PaintRect(&mDownRect);
- else
- EraseRect(&mDownRect);
-
- if (mLeft)
- PaintRect(&mLeftRect);
- else
- EraseRect(&mLeftRect);
-
- if (mRight)
- PaintRect(&mRightRect);
- else
- EraseRect(&mRightRect);
-
- if (mPulse)
- PaintRect(&mPulseRect);
- else
- EraseRect(&mPulseRect);
-
- EraseRect(&mTimeRect);
- NumToString(mTransitTime, str);
-
- MoveTo(mTimeRect.left + 4, mTimeRect.bottom - 4);
- DrawString(str);
- }